package javaTeste.tFor;

import java.Condicao;
import java.bloco.Comando;
import java.bloco.For;
import java.variavel.Variavel;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;


public class TesteBlocoFor implements Especificacao {
	For forInt = null;
	@Before
	public void up() {
		forInt = new For(new Variavel("int", "i"), new Condicao("i<0"),
				new Comando("i++"));
	}
	@Test
	public void forintICondicaoMenorZeroIncrementacaoI() {
		Assert.assertEquals("for(int i;i<0;i++){}", forInt.codigoFonte());
	}
	@Test
	public void forintICondicaoMenorZeroIncrementacaoILogicaA() {
		forInt.setLogica("a");
		Assert.assertEquals("for(int i;i<0;i++){a}", forInt.codigoFonte());
	}

}